<template>

	<div>

		<!-- 面包屑导航区 -->
		<el-breadcrumb separator-class="el-icon-arrow-right">
			<el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
			<el-breadcrumb-item :to="{ path: '/group' }">群组</el-breadcrumb-item>
			<el-breadcrumb-item>群组"{{GroupName}}"成员列表</el-breadcrumb-item>
			<el-button size="mini" style="float: right; padding-right:15px;background: #ffd7dd;color: #ff6b6b;" @click="BackGroup()">返回</el-button>
		</el-breadcrumb>

		<!-- 卡片视图区域 -->
		<el-card>
			<!-- 群组成员列表区域 -->
			<el-table stripe border :data="DetailsList.slice((currentPage-1)*pageSize,currentPage*pageSize)">
				<el-table-column label="姓名" prop=""></el-table-column>
				<el-table-column label="班级" prop=""></el-table-column>
			</el-table>
			<!-- 分页 -->
			<!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
			 :page-sizes="[1, 2, 5, 10]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="groupList.length">
			</el-pagination> -->
			
			
			
		</el-card>
		<div>
		群组成员展示页<br />
		{{msg}}<br />
		{{GroupName}}<br />
		{{groupInfo}}
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {

				DetailsList: [],


				msg: '',
				GroupName: '',
				groupInfo: '',


				currentPage: 1, // 当前页码
				total: 20, // 总条数
				pageSize: 2, // 每页的数据条数
			}
		},
		
		
		created() {
			this.getDetailsList()
		},
		
		
		/* 接收groupIdex传来的参数 */
		mounted: function() {
			this.msg = this.$route.query.name
			this.GroupName = this.$route.query.Rname
			this.groupInfo = this.$route.query.allInfo
		},
		methods: {
			
			
			//返回按钮的方法
			BackGroup() {
				this.$router.push({path:"/group"});
			},
			
			/* 分页功能的实现 */
			handleSizeChange(val) {
				console.log(`每页 ${val} 条`);
				this.currentPage = 1;
				this.pageSize = val;
			},
			handleCurrentChange(val) {
				console.log(`当前页: ${val}`);
				this.currentPage = val;
			},
		}
	}
</script>

<style lang="less" scoped>
	.el-breadcrumb {
		margin-top: 10px;
		margin-left: 8px;
		margin-bottom: 10px;
		font-size: 15px;
	}

	.el-card {
		box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
	}
</style>
